#include "pokemon.h"
#include <memory.h>
int damage=0;
namespace MyNS {
// 具体技能
// 伤害型

Skill *p01 = new Skill("撞击", 40, Element::None,"qrc:/sound_effect/music/sound_effect/crack.wav");
Skill *p02 = new Skill("拍击", 40, Element::None);
Skill *p03 = new Skill("泰山压顶", 85, Element::None);
Skill *p04 = new Skill("舍身冲撞", 80, Element::None);
Skill *p05 = new Skill("高速星星", 60, Element::None);
Skill *p06 = new Skill("百万吨重拳", 85, Element::None,"qrc:/sound_effect/music/sound_effect/boxing.wav");
Skill *p07 = new Skill("咬住", 60, Element::None);

Skill *p11 = new Skill("水枪", 40, Element::Water,"qrc:/sound_effect/music/sound_effect/water.wav");
Skill *p12 = new Skill("泡沫光线", 65, Element::Water);
Skill *p13 = new Skill("冲浪", 90, Element::Water,"qrc:/sound_effect/music/sound_effect/hua.wav");
Skill *p14 = new Skill("攀瀑", 80, Element::Water,"qrc:/sound_effect/music/sound_effect/hong.wav");
Skill *p15 = new Skill("水流尾", 90, Element::Water,"qrc:/sound_effect/music/sound_effect/fsword.wav");

Skill *p21 = new Skill("藤鞭", 35, Element::Grass);
Skill *p22 = new Skill("飞叶快刀", 55, Element::Grass);
Skill *p23 = new Skill("种子炸弹", 80, Element::Grass);
Skill *p24 = new Skill("能量球", 80, Element::Grass);
Skill *p25 = new Skill("叶刃", 90, Element::Grass,"qrc:/sound_effect/music/sound_effect/fsword.wav");

Skill *p31 = new Skill("火花", 40, Element::Fire,"qrc:/sound_effect/music/sound_effect/fire.wav");




Skill *p32 = new Skill("喷射火焰", 90, Element::Fire,"qrc:/sound_effect/music/sound_effect/fire.wav");

Skill *p33 = new Skill("大字炎爆", 110, Element::Fire);
Skill *p34 = new Skill("火焰拳", 75, Element::Fire,"qrc:/sound_effect/music/sound_effect/boxing.wav");
Skill *p35 = new Skill("火焰牙", 65, Element::Fire);

Skill *p41 = new Skill("铁头", 80, Element::Steel);
Skill *p42 = new Skill("加农光炮", 100, Element::Steel);
Skill *p43 = new Skill("铁尾", 100, Element::Steel,"qrc:/sound_effect/music/sound_effect/fsword.wav");
Skill *p44 = new Skill("刚翼", 70, Element::Steel);
Skill *p45 = new Skill("金属爪", 50, Element::Steel,"qrc:/sound_effect/music/sound_effect/fsword.wav");

Skill *p51 = new Skill("岩崩", 75, Element::Rock);
Skill *p52 = new Skill("岩石封锁", 60, Element::Rock);
Skill *p53 = new Skill("尖石攻击", 100, Element::Rock);
Skill *p54 = new Skill("重磅冲击", 120, Element::Rock);
Skill *p55 = new Skill("断崖之剑", 100, Element::Rock,"qrc:/sound_effect/music/sound_effect/fsword.wav");

Skill *p61 = new Skill("雷电拳", 75, Element::Electric,"qrc:/sound_effect/music/sound_effect/boxing.wav");
Skill *p62 = new Skill("雷电牙", 65, Element::Electric);
Skill *p63 = new Skill("伏特攻击", 120, Element::Electric,"qrc:/sound_effect/music/sound_effect/zi.wav");
Skill *p64 = new Skill("十万伏特", 90, Element::Electric,"qrc:/sound_effect/music/sound_effect/ca.wav");
Skill *p65 = new Skill("打雷", 110, Element::Electric);

Skill *p71 = new Skill("冰砾", 40, Element::Ice);
Skill *p72 = new Skill("冰锥", 80, Element::Ice,"qrc:/sound_effect/music/sound_effect/sou.wav");
Skill *p73 = new Skill("冰冻光束", 90, Element::Ice);
Skill *p74 = new Skill("暴风雪", 110, Element::Ice);
Skill *p75 = new Skill("冰刃斩", 75, Element::Ice,"qrc:/sound_effect/music/sound_effect/fsword.wav");
Skill *p76 = new Skill("冰冻牙", 65, Element::Ice);
Skill *p77 = new Skill("冰冻拳", 75, Element::Ice,"qrc:/sound_effect/music/sound_effect/boxing.wav");

Skill *p81 = new Skill("污泥炸弹", 90, Element::Poison);
Skill *p82 = new Skill("毒击", 80, Element::Poison);
Skill *p83 = new Skill("毒液冲击", 65, Element::Poison,"qrc:/sound_effect/music/sound_effect/water.wav");
Skill *p84 = new Skill("溶解液", 65, Element::Poison,"qrc:/sound_effect/music/sound_effect/water.wav");
Skill *p85 = new Skill("垃圾射击", 120, Element::Poison,"qrc:/sound_effect/music/sound_effect/water.wav");

// 回复型
//  基础回复：固定值
HealSkill *p911 = new HealSkill("伤药", 40);

// 攻击力加成型回复（适合物理型宝可梦）

HealSkill *p921 = new HealSkill("吸收拳", 25, true,"qrc:/sound_effect/music/sound_effect/boxing.wav");
HealSkill *p922 = new HealSkill("充电", 30, true,"qrc:/sound_effect/music/sound_effect/energe.wav");
HealSkill *p923 = new HealSkill("水环流", 30, true);
HealSkill *p924 = new HealSkill("汲取", 40, true,"qrc:/sound_effect/music/sound_effect/energe.wav");


// 最大HP百分比回复（适合坦克型宝可梦）
HealSkill *p931 = new HealSkill("羽栖", 0, false, true, 0.5f); // 回复50%最大HP
HealSkill *p932 = new HealSkill("自我再生", 0, false, true, 0.5f);
HealSkill *p933 = new HealSkill("光合作用", 0, false, true, 0.5f);
HealSkill *p934 = new HealSkill("晨光", 0, false, true, 0.5f);
HealSkill *p935 = new HealSkill("睡觉", 0, false, true, 0.8f);

// 创建宝可梦（示例数据，实际应从游戏状态获取）
// 空
Pokemon *playerPokemon01;//伊布
Pokemon *playerPokemon02;//皮可西

// 水
Pokemon *playerPokemon11;//杰尼龟
Pokemon *playerPokemon12;//可达鸭

// 草
Pokemon *playerPokemon21;//妙蛙种子
Pokemon *playerPokemon22;//大食花

// 火
Pokemon *playerPokemon31;//小火龙
Pokemon *playerPokemon32;//火伊布

// 钢
Pokemon *playerPokemon41;//铁哑铃
Pokemon *playerPokemon42;//可多拉

// 岩石
Pokemon *playerPokemon51;//大岩蛇
Pokemon *playerPokemon52;//不会飞

// 电
Pokemon *playerPokemon61;//皮卡丘
Pokemon *playerPokemon62;//雷伊布


// 冰属性
Pokemon *playerPokemon71;//铁甲贝
Pokemon *playerPokemon72;//冰鬼护

// 毒属性
Pokemon *playerPokemon81;//臭臭泥
Pokemon *playerPokemon82;//瓦斯弹

//我方可选宝可梦
Pokemon *playerPokemon103;//皮卡丘
Pokemon *playerPokemon104;//喷火龙
Pokemon *playerPokemon105;//水箭龟
Pokemon *playerPokemon106;//妙蛙花

//特殊可选
Skill *p1111 = new Skill("saki 移动", 99, Element::None,"qrc:/sound_effect/music/sound_effect/saki.wav");
Skill *p1112 = new Skill("全部不会弹", 100, Element::None,"qrc:/sound_effect/music/sound_effect/quandou.wav");
HealSkill *p1113 = new HealSkill("小黄瓜", 200);
Pokemon *playerPokemon101;//mutsumi

Skill *p1114 = new Skill("跟你爆了", 300, Element::None,"qrc:/sound_effect/music/sound_effect/explode.mp3");
Pokemon *playerPokemon102;//nina

Pokemon *playerPokemon1111;//mutsumi

Pokemon *playerPokemon1112;//nina


void initPokemon(); // 初始化
void deletePokemon();
} // namespace MyNS

void MyNS::initPokemon()
{


    // 空
    playerPokemon01 = new Pokemon("伊布", 160, 55, 50, Element::None, ":/find/001.png");
    playerPokemon01->addSkill(p01);
    playerPokemon01->addSkill(p04);
    playerPokemon01->addSkill(p05);
    playerPokemon01->addSkill(p07);

    playerPokemon02 = new Pokemon("皮可西", 254, 45, 40, Element::None, ":/find/002.png");
    playerPokemon02->addSkill(p34);
    playerPokemon02->addSkill(p61);
    playerPokemon02->addSkill(p77);
    playerPokemon02->addSkill(p932);

    //水
    playerPokemon11 = new Pokemon("杰尼龟", 148, 48, 65, Element::Water, ":/find/101.png");
    playerPokemon11->addSkill(p01);
    playerPokemon11->addSkill(p13);
    playerPokemon11->addSkill(p14);
    playerPokemon11->addSkill(p72);

    playerPokemon12 = new Pokemon("可达鸭", 155, 52, 48, Element::Water, ":/find/102.png");
    playerPokemon12->addSkill(p07);
    playerPokemon12->addSkill(p12);
    playerPokemon12->addSkill(p41);
    playerPokemon12->addSkill(p923);

    //草
    playerPokemon21 = new Pokemon("妙蛙种子", 149, 49, 49, Element::Grass, ":/find/201.png");
    playerPokemon21->addSkill(p02);
    playerPokemon21->addSkill(p21);
    playerPokemon21->addSkill(p23);
    playerPokemon21->addSkill(p933);

    playerPokemon22 = new Pokemon("大食花", 177, 105, 65, Element::Grass, ":/find/202.png");
    playerPokemon22->addSkill(p07);
    playerPokemon22->addSkill(p23);
    playerPokemon22->addSkill(p84);
    playerPokemon22->addSkill(p924);

    //火
    playerPokemon31 = new Pokemon("小火龙", 143, 52, 43, Element::Fire, ":/find/301.png");
    playerPokemon31->addSkill(p01);
    playerPokemon31->addSkill(p32);
    playerPokemon31->addSkill(p34);
    playerPokemon31->addSkill(p45);

    playerPokemon32 = new Pokemon("火伊布", 171, 130, 60, Element::Fire, ":/find/302.png");
    playerPokemon32->addSkill(p04);
    playerPokemon32->addSkill(p33);
    playerPokemon32->addSkill(p35);
    playerPokemon32->addSkill(p934);

    //钢
    playerPokemon41 = new Pokemon("铁哑铃", 144, 80, 100, Element::Steel, ":/find/401.png");
    playerPokemon41->addSkill(p04);
    playerPokemon41->addSkill(p41);
    playerPokemon41->addSkill(p45);
    playerPokemon41->addSkill(p01);

    playerPokemon42 = new Pokemon("可多拉", 177, 85, 110, Element::Steel, ":/find/402.png");
    playerPokemon42->addSkill(p03);
    playerPokemon42->addSkill(p42);
    playerPokemon42->addSkill(p43);
    playerPokemon42->addSkill(p53);

    //岩石
    playerPokemon51 = new Pokemon("大岩蛇", 160, 70, 85, Element::Rock, ":/find/501.png");
    playerPokemon51->addSkill(p03);
    playerPokemon51->addSkill(p54);
    playerPokemon51->addSkill(p53);
    playerPokemon51->addSkill(p43);

    playerPokemon52 = new Pokemon("固拉多", 210, 150, 140, Element::Rock, ":/find/502.png");
    playerPokemon52->addSkill(p32);
    playerPokemon52->addSkill(p44);
    playerPokemon52->addSkill(p55);
    playerPokemon52->addSkill(p935);

    //电
    playerPokemon61 = new Pokemon("皮卡丘", 138, 55, 40, Element::Electric, ":/find/601.png");
    playerPokemon61->addSkill(p43);
    playerPokemon61->addSkill(p63);
    playerPokemon61->addSkill(p64);
    playerPokemon61->addSkill(p922);

    playerPokemon62 = new Pokemon("雷伊布", 172, 135, 60, Element::Electric, ":/find/602.png");
    playerPokemon62->addSkill(p05);
    playerPokemon62->addSkill(p62);
    playerPokemon62->addSkill(p65);
    playerPokemon62->addSkill(p922);

    // 冰属性
    playerPokemon71 = new Pokemon("铁甲贝", 155, 95, 140, Element::Ice, ":/find/701.png");
    playerPokemon71->addSkill(p44);
    playerPokemon71->addSkill(p72);
    playerPokemon71->addSkill(p73);
    playerPokemon71->addSkill(p932);
    playerPokemon72 = new Pokemon("冰鬼护", 166, 95, 80, Element::Ice, ":/find/702.png");
    playerPokemon72->addSkill(p03);
    playerPokemon72->addSkill(p12);
    playerPokemon72->addSkill(p74);
    playerPokemon72->addSkill(p75);

    // 毒属性
    playerPokemon81 = new Pokemon("臭臭泥", 225, 90, 80, Element::Poison, ":/find/801.png");
    playerPokemon81->addSkill(p03);
    playerPokemon81->addSkill(p52);
    playerPokemon81->addSkill(p81);
    playerPokemon81->addSkill(p85);
    playerPokemon82 = new Pokemon("瓦斯弹", 166, 80, 70, Element::Poison, ":/find/802.png");
    playerPokemon82->addSkill(p04);
    playerPokemon82->addSkill(p31);
    playerPokemon82->addSkill(p81);
    playerPokemon82->addSkill(p82);


    //特殊角色
    playerPokemon103 = new Pokemon("皮卡丘", 138, 55, 40, Element::Electric, ":/find/6012.png");
    playerPokemon103->addSkill(p43);
    playerPokemon103->addSkill(p63);
    playerPokemon103->addSkill(p64);
    playerPokemon103->addSkill(p922);

    playerPokemon104 = new Pokemon("喷火龙", 143, 132, 53, Element::Fire, ":/find/3012.png");
    playerPokemon104->addSkill(p01);
    playerPokemon104->addSkill(p32);
    playerPokemon104->addSkill(p34);
    playerPokemon104->addSkill(p45);

    playerPokemon105 = new Pokemon("水箭龟", 175, 62, 142, Element::Water, ":/find/1012.png");
    playerPokemon105->addSkill(p01);
    playerPokemon105->addSkill(p13);
    playerPokemon105->addSkill(p14);
    playerPokemon105->addSkill(p72);

    playerPokemon106 = new Pokemon("妙蛙花", 169, 89, 89, Element::Grass, ":/find/2012.png");
    playerPokemon106->addSkill(p02);
    playerPokemon106->addSkill(p21);
    playerPokemon106->addSkill(p23);
    playerPokemon106->addSkill(p933);

    playerPokemon101 = new Pokemon("mutsumi", 520, 40, 40, Element::None, ":/find/mutsumi.png");
    playerPokemon101->addSkill(p1111);
    playerPokemon101->addSkill(p1112);
    playerPokemon101->addSkill(p1113);
    playerPokemon101->addSkill(p81);

    playerPokemon102 = new Pokemon("nina", 520, 40, 40, Element::None, ":/find/nina.png");
    playerPokemon102->addSkill(p1114);
}

void MyNS::deletePokemon()
{
    delete p01;
    delete p02;
    delete p03;
    delete p04;
    delete p05;
    delete p06;
    delete p07;

    delete p11;
    delete p12;
    delete p13;
    delete p14;
    delete p15;

    delete p21;
    delete p22;
    delete p23;
    delete p24;
    delete p25;

    delete p31;
    delete p32;
    delete p33;
    delete p34;
    delete p35;

    delete p41;
    delete p42;
    delete p43;
    delete p44;
    delete p45;

    delete p51;
    delete p52;
    delete p53;
    delete p54;
    delete p55;

    delete p61;
    delete p62;
    delete p63;
    delete p64;
    delete p65;

    delete p71;
    delete p72;
    delete p73;
    delete p74;
    delete p75;
    delete p76;
    delete p77;

    delete p81;
    delete p82;
    delete p83;
    delete p84;
    delete p85;

    // 回复型
    //  基础回复：固定, 40);
    delete p911;
    // 攻击力加成型回复（适合物理型宝可梦）
    delete p921;
    delete p922;
    delete p923;
    delete p924;
    // 最大HP百分比回复（适合坦克型宝可梦）
    delete p931;
    delete p932;
    delete p933;
    delete p934;
    delete p935;

    // 创建宝可梦（示例数据，实际应从游戏状态获取）
    // 空
    delete playerPokemon01;
    delete playerPokemon02;

    // 水
    delete playerPokemon11;
    delete playerPokemon12;

    // 草
    delete playerPokemon21;
    delete playerPokemon22;

    // 火
    delete playerPokemon31;
    delete playerPokemon32;

    //钢
    delete playerPokemon41;
    delete playerPokemon42;

    //岩石
    delete playerPokemon51;
    delete playerPokemon52;

    //电
    delete playerPokemon61;
    delete playerPokemon62;

    // 冰属性
    delete playerPokemon71;
    delete playerPokemon72;

    // 毒属性
    delete playerPokemon81;
    delete playerPokemon82;

    // ////////
    delete p1111;
    delete p1112;
    delete p1113;
    delete playerPokemon101;

    delete p1114;
    delete playerPokemon102;

    delete playerPokemon103;

    delete playerPokemon104;

    delete playerPokemon105;

    delete playerPokemon106;
}
